﻿@using System.Collections.Concurrent
@model Bonobo.Git.Server.Models.LogOnModel
@{
    ViewBag.Title = @Resources.Home_LogOn_Title;
}

<h1>@Resources.Home_LogOn_Title</h1>

@using (Html.BeginForm("LogOn", "Home", FormMethod.Post, new { @class = "pure-form pure-form-aligned" }))
{
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(false, Resources.Home_LogOn_Failed)

    <fieldset>
        <div class="pure-control-group">
            @Html.LabelFor(m => m.Username)
            @Html.TextBoxFor(m => m.Username, new { autofocus = "" })<em>*</em>
            @Html.ValidationMessageFor(m => m.Username)
        </div>
        <div class="pure-control-group">
            @Html.LabelFor(m => m.Password, new { accesskey = "p" })
            @Html.PasswordFor(m => m.Password, new { @class = "textInput small" })<em>*</em>
            @Html.ValidationMessageFor(m => m.Password)
        </div>
        <div class="pure-control-group">
            @Html.LabelFor(m => m.RememberMe)
            @Html.CheckBoxFor(m => m.RememberMe)
            @Html.ValidationMessageFor(m => m.RememberMe)
        </div>
        @Html.HiddenFor(m => m.ReturnUrl)
        @if (Model.DatabaseResetCode != 0)
        {
            @Html.TextBoxFor(m => m.DatabaseResetCode)
        }
        <div class="pure-controls">
            <button type="submit" class="pure-button pure-button-primary"><i class="fa fa-sign-in"></i> @Resources.Home_LogOn_LogOn</button>
        </div>
        <div class="pure-controls">
            @Html.ActionLink(Resources.Home_LogOn_ForgotPassword, "ForgotPassword")
        </div>
    </fieldset>
}
